﻿#region Librerias

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESF.SSO.Core.BusinessLogic;
using ESF.General.Entity;
using ESF.SSO.Core.Entities.BasicReferences;
using ESF.General;

#endregion


namespace ESF.SSO.Presenter.Admin
{
	public static class GeneralAdmin
	{
		#region Funciones Estaticas
		
		public static BrowseResults<ESF.General.Entity.BasicReference> QueryBasicReferenceList (BasicReferenceTypes pType, string prefixText, int count)
		{
			return QueryBasicReferenceList ((int) pType, prefixText, count);
		}


		public static BrowseResults<ESF.General.Entity.BasicReference> QueryBasicReferenceList (int pBasicReferenceTypeID, string prefixText, int count)
		{
			return CtrlBasicReference.Browse (
				new ESF.General.Entity.BasicReference () { Name = prefixText, BasicReferenceType = new BasicReferenceType () { ID = pBasicReferenceTypeID }}, 
				new PaggingInfo () { PageIndex = 0, PageSize = count });
		}


		public static List<ESF.General.Entity.BasicReference> GetIdentificationTypeList()
		{
			return CtrlBasicReference.List (BasicReferenceTypes.IdentificationType);
		}


		public static List<ESF.General.Entity.BasicReference> GetBasicReferenceList(BasicReferenceTypes pType)
		{
			return CtrlBasicReference.List (pType);
		}
		
		
		public static List<ESF.General.Entity.BasicReference> GetYESNOList ()
		{
			return TextHelper.YESNOList;
		}
		
		#endregion
	}
}
